#ifndef DECODE_HPP
#define DECODE_HPP 1

#include <cstdint>
#include "bitinput.hpp"

namespace fur
{
   const int LDC = 17;
   const int BC = 20;
   const int RC = 28;
   const int DC = 60;
   const int NC = 299;
   const int HTS = 404;

   class Decode
   {
   public:
      Decode() throw() {};
      ~Decode() throw() {};
      uint16_t get_number(BitInput &bitinput) throw();
      void make_table(uint8_t * lengthtable, int size) throw();
   private:
      uint32_t maxnumber;
      uint16_t length[16];
      uint8_t len[0x10000];
      uint16_t position[16];
      uint16_t number[HTS];
   };
} // end of namespace fur

#endif /* decode.hpp */
